\section{Overall Architecture}
As is shown in figure 1 , our interpreter can be divided into 3 parts, the front end, the AST, the back end.\\

\begin{wrapfigure}{c}{10cm}
\center\includegraphics[width=10cm]{architecture.png}
\caption{figure 1}
\end{wrapfigure}

\section{Front End}
The front end includes the scanner and the parser, which are implemented
with lex and Yacc respectively. The scanner translates characters into tokens,
while the parser parse the token stream and generate an abstract syntax tree

\section{AST}

The AST is the core of our interpreter, which connects the front end with 
back end. So that team members can work on both parts at the same time. When
the data structure of the tree is already set.


\section{Back End}

The back end take in the abstract syntax tree and generate the intermediate
code by traveralling through the whole tree. During the travelling process,
we generate three tables : event table, function table and variable table.  
With the generated tables and the AST, our interpreter can generate the final
output.

